import request from '/@/utils/request';

export function getTypeList(query: Object) {
    return request({
        url: '/api/v1/dict/types',
        method: 'get',
        params: query
    })
}

export function getType(id: number) {
    return request({
        url: '/api/v1/dict/type/detail',
        method: 'get',
        params: {id}
    })
}

export function addType(data: any) {
    return request({
        url: '/api/v1/dict/type/add',
        method: 'post',
        data: data
    })
}

export function editType(data: any) {
    return request({
        url: '/api/v1/dict/type/update',
        method: 'put',
        data: data
    })
}


export function deleteType(ids: number[]) {
    return request({
        url: '/api/v1/dict/type/delete',
        method: 'delete',
        data: {ids}
    })
}


// 获取字典选择框列表
export function optionselect() {
    return request({
        url: '/api/v1/system/dict/type/optionSelect',
        method: 'get'
    })
}

